home *** CD-ROM | disk | FTP | other *** search
- #!/bin/sh
-
- set -e
-
- rm_conffile() {
- CONFFILE="$1"
- OLD_MD5SUM="$2"
- if [ -e "$CONFFILE" ]; then
- md5sum="$(md5sum "$CONFFILE" | sed -e 's/ .*//')"
- if [ "$md5sum" != "$OLD_MD5SUM" ]; then
- echo "Obsolete conffile $CONFFILE has been modified by you."
- echo "Saving as $CONFFILE.dpkg-bak ..."
- mv -f "$CONFFILE" "$CONFFILE".dpkg-bak
- else
- echo "Removing obsolete conffile $CONFFILE ..."
- rm -f "$CONFFILE"
- fi
- fi
- }
-
- case "$1" in
- install|upgrade)
- if dpkg --compare-versions "$2" lt "0.50-2"; then
- rm_conffile "/etc/X11/Xsession.d/75dbus-1-utils_dbus-launch" f16c15c4b018d37ca3ea2b6aba224439
- fi
- esac
-
- # Automatically added by dh_installinit
- if [ "$1" = install ] || [ "$1" = upgrade ]; then
- if [ -e "/etc/init.d/dbus" ] && [ ! -L "/etc/init.d/dbus" ]; then
- if [ "`md5sum \"/etc/init.d/dbus\" | sed -e \"s/ .*//\"`" != \
- "`dpkg-query -W -f='${Conffiles}' dbus | sed -n -e \"\\\\' /etc/init.d/dbus '{s/ obsolete$//;s/.* //p}\"`" ]
- then
- echo "Obsolete conffile /etc/init.d/dbus has been modified by you, renaming to .dpkg-bak"
- mv -f "/etc/init.d/dbus" "/etc/init.d/dbus.dpkg-bak"
- else
- rm -f "/etc/init.d/dbus"
- fi
- fi
- fi
- # End automatically added section
-
-
-